//
//  CMFileCache.h
//  LLP
//
//  Created by pan Shiyu on 12-10-14.
//  Copyright (c) 2012年 Porcellio. All rights reserved.
//

#import <Foundation/Foundation.h>


/**
 做文件缓存，存沙盒里面
 
 将来可以加入有效期的概念
 
 */


@interface CMFileCache : NSObject

+ (CMFileCache*)shareFileCache;

- (BOOL)hasData:(NSString*)fPath;
- (NSString*)filePathWithName:(NSString*)fName;//沙盒地址后缀

- (void)saveFile:(NSData*)fData withPath:(NSString*)fPath;
- (NSData*)fileDataByPath:(NSString*)fPath;
- (void)removeFileByPath:(NSString*)fPath;

- (void)removeAll;
- (float)cacheSize;//cache容量，单位是M

@end
